package com.team.arms.utils;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

/**
 * @Author huazige
 * @Date 2022/5/9 22:06
 * @Version 1.0
 */

 public  class gettype {
     public static  String getFirstActualType(Object o,int index){
         Type genericSuperclass = o.getClass().getGenericSuperclass();
         ParameterizedType pt = (ParameterizedType)genericSuperclass;
         System.out.println(o.getClass());
         String s = o.toString();
         String substring = s.substring(1, 15);
         String[] split = substring.split("\\(");
         System.out.println(split[0]);

         return pt.getActualTypeArguments().toString();
     }
}
